// 初始化多语言
//@ts-ignore
import { createApp } from "vue";
import "@/plugins/unocss";
import { setupI18n } from "@/plugins/vueI18n";
import { setupStore } from "@/stores";
// 全局组件
import { setupGlobCom } from "@/components";
// 引入 element-plus
import { setupElementPlus } from "@/plugins/elementPlus";

// 引入全局样式
import "@/styles/index.scss";
// 引入动画
import "@/plugins/animate.css";
// 导入全局的svg图标
import "@/plugins/svgIcon";
import App from "./App.vue";
import router, { setupRouter } from "@/router";

//import "@/plugins/tongji"; // 百度统计
//@ts-ignore
import VueDOMPurifyHTML from "vue-dompurify-html"; // 解决v-html 的安全隐患
const setAll = async () => {
  const app = createApp(App);
  await setupI18n(app);
  setupStore(app);
  setupGlobCom(app);
  setupElementPlus(app);
  setupRouter(app);
  await router.isReady();
  app.use(VueDOMPurifyHTML);
  app.mount("#app");
};
setAll();
